﻿Public Class vwChiTietPhieuXuat
    Public Overrides Function ToString() As String
        Return MyBase.ToString()
    End Function

    Private _MaPhieu As String
    Property MaPhieu As String
        Get
            Return "X" + Me.NgayLap.ToString("MM/yyyy") + "/" + Me.SoPhieuXuat.ToString.PadLeft(My.Settings.SoSoKhongXuatNhap, "0")
        End Get
        Set(value As String)
            _MaPhieu = value
        End Set
    End Property

    Private _TongTien As Decimal
    Public Property TongTien() As Decimal
        Get
            Return dt.vwChiTietPhieuXuats.Sum(Function(s) s.GiaXuat * s.SoLuong)
        End Get
        Set(ByVal value As Decimal)
            _TongTien = value
        End Set
    End Property
End Class
